package com.qzimp.fujiancuo.mapper;

import com.mybatisflex.core.BaseMapper;
import com.qzimp.fujiancuo.entity.Cuisine;
import com.qzimp.fujiancuo.entity.Cuo;
import com.qzimp.fujiancuo.entity.Enterprise;
import com.qzimp.fujiancuo.entity.dto.CuoEventDTO;
import com.qzimp.fujiancuo.entity.dto.CuoTourist;
import org.apache.ibatis.annotations.Select;

import java.io.Serializable;
import java.util.List;

/**
 *  映射层。
 *
 * @author 吴宗波
 * @since 2024-11-21
 */
public interface CuoMapper extends BaseMapper<Cuo> {
    /*根据厝id查询厝的所有事件*/
    CuoEventDTO getCuoEventId(Integer id);

    CuoTourist getCuoTourist(Integer id);

    List<Enterprise> selectById(Serializable id);
    @Select("select tb_cuisine.name,tb_cuisine.images from tb_cuo ,tb_cuisine where tb_cuo.id = tb_cuisine.cuo_id and tb_cuo.id = #{id}")
    List<Cuisine> selectByAllId(Serializable id);
}
